<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" th:href="@{/favicon.ico}" >
	<title>保养任务</title>
		
</head>
<body>
<!--头部-->
<header th:replace="common/head" >
</header> 
<!-- 页面指向 -->
<div class="page-point bg-white">
	<ul>
	<li>首页</li>
		<li>设备保养</li>
		<li>保养任务</li>
	</ul>
</div>
<!-- 菜单树 -->
<div th:replace="common/left" > 
</div>

<!-- 底部 -->
<div th:replace="common/foot" > 
</div>

<!--主体内容-->
<div class="page-container">

	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12">
			<h2 class="page-section-title">查询条件</h2>
		</div>
	</div>

	<div class="container-fluid query-frame-wrap mb-10 clearfix">
        <div class="col-lg-9 col-lg-item-6">
            <div class="row">
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>设备编号</label>
                        <select name="" id="queryEquipment" class="form-control queryEquipment queryTask">
                        </select>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="query-frame">
                        <label>设备名称</label>
                        <input autocomplete="new-password" type="text" class="form-control documentQuery queryTask" id="equipName"/>
                    </div>
                </div>
				<div class="col-lg-4">
					<div class="query-frame">
						<label>供应商</label>
						<select id="supplier" class="form-control querySupplier queryTask" name="supplier">
						</select>
					</div>
				</div>
            </div>
            <div class="row">
                 <div class="col-lg-4">
					<div class="query-frame date-frame">
						<label>下次保养时间</label>
						<input autocomplete="new-password" type="text"  id="accessTimeStart"   class="form_datetimeStart form-control queryAccess queryTask"   value="" readonly="readonly"/>
					</div>
				</div>
				<div class="col-lg-4">
					<div class="query-frame date-frame">
						<label>至</label>
						<input autocomplete="new-password" type="text"  id="accessTimeEnd"   class="form_datetimeEnd form-control queryAccess queryTask"   value="" readonly="readonly"/>
					</div>
				</div>
				<div class="col-lg-4">
					<div class="query-frame">
						<label>快捷时间</label>
						<select id="shortcutTime" class="form-control queryTask" name="shortcutTime">
							<option value="">快捷时间</option>
							<option value="1">昨天</option>
							<option value="2">上周</option>
							<option value="3">上月</option>
							<option value="4">上季度</option>
							<option value="5">上半年</option>
							<option value="6">去年</option>
						</select>
					</div>
				</div>

            </div>
            <div class="row">
				<div class="col-lg-4">
					<div class="query-frame">
						<label>设备类别</label>
	<!-- 					<select class="form-control equipType" name="equipType">
						</select> -->
						<select name="modelType" class="form-control modelType">
								<option value="">请选择</option>
		                    	<option value="1">生产类</option>
	                    		<option value="2">环境类</option>
	                    		<option value="3">能源类</option>
	                    		<option value="4">检测类</option>
	                    		<option value="5">生产辅助类</option>
                    	</select>
					</div>
				</div>
            </div>        
        </div>

        <div class="col-lg-3">
            <div class="query-frame query-button">
                <img id="queryTask" src="/linkdcs/image/search.png" />
                <img class="resetTask" src="/linkdcs/image/rest.png" />
            </div>
        </div>
	</div>
	<div class="container-fluid mb-20 clearfix">
		<div class="col-md-12 rlt">
			<h2 class="page-section-title">待保养任务列表</h2>
			<ul class="table-tool">
			    <li id="addTask">
			        <span class="icon-list_add" aria-hidden="true"></span>
			        <label>新增</label>
			    </li>
			    <li id="maintainTask">
			        <span class="icon-list_xiugai" aria-hidden="true"></span>
			        <label>保养</label>
			    </li>
			    <li id="refreshTask" class="last">
			        <span class="icon-list_shuaxin" aria-hidden="true"></span>
			        <label>刷新</label>
			    </li>
			</ul>
		</div>
	</div>

	<div class="container-fluid table-container">
		<table id="taskTable">

		</table>
	</div>
</div>

<!--模态框-新增临时任务-->
<div class="modal fade taskForm" id="myModal" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false"
>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Newly added</h4>
      </div>
      <div class="modal-body">
		    <div class="row">
		        <div class="col-lg-12">
		            <form id="defaultForm" method="post" class="form-horizontal typeFormTable" action="">
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-4">设备编码</label>
		                    <div class="col-lg-7">
		                    	<select name="equipCode" id="querryAcEquipCode" class="form-control">
                        		</select>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label">设备名称</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="equipName" value="" disabled/>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label">厂区</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="fatoryName" value="" disabled/>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label ">产线</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="lineName" value="" disabled/>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label ">车间</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="shopName" value="" disabled/>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label">区域</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="areaName" value="" disabled/>
		                    </div>
		                </div>
                        <div class="form-group">
                            <label class="col-lg-3 control-label form-required form-required-6">保养类别编码</label>
                            <div class="col-lg-7">
                                <select class="form-control" name="typeId" id="typeCodeSelect2">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 control-label">保养类别名称</label>
                            <div class="col-lg-7">
                                <input autocomplete="new-password" class="form-control" type="text" name="typeName" readonly/>
                            </div>
                        </div>
                        <div class="form-group">
						  <label class="col-lg-3 control-label form-required form-required-6">下次保养时间</label>
							  <div class="col-lg-7 date-frame">
							    <input autocomplete="new-password" class="form_datetimeStart form-control" name="nextDate" type="text" value="" readonly>
							  </div>
						</div>
						<div class="form-group">
                                <label class="col-lg-3 control-label form-required form-required-3">保养人</label>
                                <div class="col-lg-7">
                                    <select name="maintainUserName" class="form-control systemUserSearch">
                                    </select>
                                </div>
                        </div>
                        <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-4">保养确认</label>
		                    <div class="col-lg-7">
           						<select class="form-control maintainConfirm" name="maintainConfirm">
           							<option selected="selected" value="0">是</option>
									<option value="1">否</option>
								</select>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-lg-3 control-label">备注</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="remark" value="" />
		                    </div>
		                </div>
		                
             		<!-- 隐藏唯一id -->
					<input autocomplete="new-password" type="hidden" name="pkId" id="pkId" value="" />
		            </form>
		        </div>
		    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary yes">保存</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>


<!--关联保养项模态框-->
<div class="modal fade" id="ItemModal" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false"
>
  <div class="modal-dialog modal-dialog-big-2" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Newly added</h4>
      </div>
	  <div class="modal-body">
		<div id='table-wrap-1' class='scroll-style' style='height: 300px; overflow-y: auto;'>
		  	<div class="rlt">
				<h2 class="page-section-title" style='margin: 0;'>保养项列表</h2>
				<div id="errorTask" class="table-tool" style="color:red">保养结果或保养总耗时不能为空</div>
			</div>
	        <div class="" style='margin-top: 20px;'>
				<div class="table-container">
					<table id="itemTable">
			
					</table>
				</div>
	        </div>
		</div>
		<div id='table-wrap-2' class='scroll-style' style='height: 300px; overflow-y: auto;'>
		  	<div class="rlt">
				<h2 class="page-section-title" style='margin: 0;'>备件/工装更换</h2>
				<ul class="table-tool">
				    <li id="addPartOrTool">
				        <span class="icon-list_add" aria-hidden="true"></span>
				        <label>新增</label>
				    </li>
				    <li id="upDatePartOrTool">
				        <span class="icon-list_xiugai" aria-hidden="true"></span>
				        <label>修改</label>
				    </li>
				    <li id="delPartOrTool" class="last">
				        <span class="icon-list_shuaxin" aria-hidden="true"></span>
				        <label>删除</label>
				    </li>
				</ul>
			</div>
	        <div class="" style='margin-top: 20px;'>
				<div class="table-container">
					<table id="PartAndToolTable">
			
					</table>
				</div>
	        </div>
		</div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary yes" id="confirmSub">确认提交</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>


<!--模态框-新增备件/工装-->
<div class="modal fade" id="partOrToolModal" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false"
>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title title"></h4>
      </div>
      <div class="modal-body">
		    <div class="row">
		        <div class="col-lg-12">
		            <form id="partOrToolForm" method="post" class="form-horizontal typeFormTable" action="">
		                <div class="form-group">
		                    <label class="col-lg-3 control-label form-required form-required-2">类型</label>
		                    <div class="col-lg-7">
           						<select class="form-control" name="type" id="typeChange">
           							<option selected="selected" value="0">备件</option>
									<option value="1">工装</option>
								</select>
		                    </div>
		                </div>
		                
		                <!-- 备件更换选项 -->
		                <div class="form-group partCodehtml">
		                    <label class="col-lg-3 control-label form-required form-required-2">备件 </label>
		                    <div class="col-lg-7">
		                    	<select class="form-control" name="code" id="partCode">
								</select>
		                    </div>
		                </div>
		                <div class="form-group partNameHtml">
		                    <label class="col-lg-3 control-label">名称</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="name" value="" id="partName"/>
		                    </div>
		                </div>
		                <div class="form-group locationCodeHtml">
		                    <label class="col-lg-3 control-label form-required form-required-6">备件位置编码</label>
		                    <div class="col-lg-7">
		                    	<select class="form-control" name="locationCode" id="locationCode">
								</select>
		                    </div>
		                </div>
		                <div class="form-group locationNameHtml">
		                    <label class="col-lg-3 control-label">备件位置名称</label>
		                    <div class="col-lg-7">
								<input autocomplete="new-password" type="text" class="form-control" name="locationName" value="" id="locationName"/>
		                    </div>
		                </div>
		                <div class="form-group nSerialNumHtml">
		                    <label class="col-lg-3 control-label form-required form-required-4">新序列号</label>
		                    <div class="col-lg-7">
		                    	<select class="form-control" name="nSerialNum" id="nSerialNum">
								</select>
		                    </div>
		                </div>
		                <div class="form-group partNumHtml">
		                    <label class="col-lg-3 control-label form-required form-required-2">个数</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="number" class="form-control" name="partnum" value="" id="partnum"/>
		                    </div>
		                </div>
		                <div class="form-group oSerialNumHtml">
		                    <label class="col-lg-3 control-label">原序列号</label>
		                    <div class="col-lg-7">
<!-- 		                    	<select class="form-control" name="oSerialNum" id="oSerialNum">
								</select> -->
								<input autocomplete="new-password" type="text" class="form-control" name="oSerialNum" value="" id="oSerialNum" readonly/>
		                    </div>
		                </div>
		                <div class="form-group useFlagPartHtml">
		                    <label class="col-lg-3 control-label form-required form-required-3">原状态</label>
		                    <div class="col-lg-7">
           						<select class="form-control" name="useFlag" id="useFlag">
           							<option value="">请选择</option>
           							<option value="0">可使用</option>
									<option value="1">不可用</option>
								</select>
		                    </div>
		                </div>
		                
		                <!-- 工装更换选项 -->
		                <div class="form-group toolCodeHtml">
		                    <label class="col-lg-3 control-label form-required form-required-3">新编码</label>
		                    <div class="col-lg-7">
		                    	<select class="form-control" name="code" id="toolCode">
								</select>
		                    </div>
		                </div>
		                <div class="form-group toolNameHtml">
		                    <label class="col-lg-3 control-label">名称</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="name" value="" id="toolName"/>
		                    </div>
		                </div>
		                <div class="form-group toolnumHtml">
		                    <label class="col-lg-3 control-label form-required form-required-2">个数</label>
		                    <div class="col-lg-7">
		                    	<input autocomplete="new-password" type="text" class="form-control" name="toolnum" value="" id="toolnum"/>
		                    </div>
		                </div>
		                <div class="form-group tooloCodeHtml">
		                    <label class="col-lg-3 control-label form-required form-required-3">原编码</label>
		                    <div class="col-lg-7">
		                    	<select class="form-control" name="oCode" id="oCode">
								</select>
		                    </div>
		                </div>
		                <div class="form-group tooluseFlaghtml">
		                    <label class="col-lg-3 control-label">原状态</label>
		                    <div class="col-lg-7">
           						<select class="form-control" name="useFlag" id="tooluseFlag">
           							<option selected="selected" value="2">可使用</option>
           							<option value="0">送修</option>
									<option value="1">报废</option>
								</select>
		                    </div>
		                </div>
		                
             		<!-- 隐藏唯一id -->
					<input autocomplete="new-password" type="hidden" name="pkId" id="id" value="" />
		            </form>
		        </div>
		    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary yes">保存</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<script th:src="@{/js/lifeCycle/equipLifeCycle/maintain/task.js}"></script>
<script th:src="@{/js/lifeCycle/equipLifeCycle/maintain/repPartOrTool.js}"></script>
</body>
</html>